﻿<UserControl x:Class="PICOC.Silverlight.View.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:modals="clr-namespace:PICOC.Silverlight.View.Modals"
    mc:Ignorable="d" 
    Height="600" Width="800" Loaded="Window_Loaded">

    <Grid Margin="10" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
            <RowDefinition Height="30" />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>

        <TextBlock Text="What is your Research Question?" Grid.Row="0" Margin="10" FontSize="24"/>
        <Button x:Name="btReportBug" Content="Did you find a Bug?" Grid.Row="0" Margin="10" Width="120" HorizontalAlignment="Right" Background="Red" Click="btReportBug_Click"/> 

        <!--<Viewbox Grid.Row="1">
            <RichTextBox x:Name="tbQuestion" FontSize="18" Width="200" ContentChanged="tbQuestion_ContentChanged" />
        </Viewbox>-->
        <RichTextBox x:Name="tbQuestion" Grid.Row="1" FontSize="18"/>

        <TextBlock Text="Synonyms" Grid.Row="2" HorizontalAlignment="Right" Margin="250,0"/>

        <Grid Grid.Row="3">
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="150"/>
                <ColumnDefinition Width="50"/>
                <ColumnDefinition Width="30"/>
                <ColumnDefinition Width="150"/>
                <ColumnDefinition Width="150"/>
                <ColumnDefinition Width="150"/>
            </Grid.ColumnDefinitions>

            <TextBlock Text="Population" Grid.Column="0" Grid.Row="0"/>
            <TextBox x:Name="tbPopulation" Grid.Column="1" Grid.Row="0" TextChanged="tbElement_TextChanged"/>
            <!--<Rectangle x:Name="legendPopulation" Fill="Red" Grid.Column="2" Grid.Row="0"/>-->
            <ComboBox x:Name="cbLegendPopulation" Grid.Column="2" Grid.Row="0" SelectedIndex="0" SelectionChanged="cbLegenda_SelectionChanged" >
                <Rectangle Fill="Red" Width="50" Height="30" />
                <Rectangle Fill="Purple" Width="50" Height="30" />
                <Rectangle Fill="Blue" Width="50" Height="30" />
                <Rectangle Fill="Green" Width="50" Height="30" />
                <Rectangle Fill="Pink" Width="50" Height="30" />
            </ComboBox>
            <Border x:Name="warningPopulation" Grid.Column="3" Grid.Row="0" Visibility="Collapsed" Background="Yellow" BorderBrush="Black" BorderThickness="3" CornerRadius="30,30,5,5" ToolTipService.ToolTip="WARNING: It's not in your question.">
                <TextBlock Text="!" HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </Border>
            <TextBox x:Name="tbPopulationS1" Grid.Column="4" Grid.Row="0" TextChanged="tbSyn_TextChanged"/>
            <TextBox x:Name="tbPopulationS2" Grid.Column="5" Grid.Row="0" TextChanged="tbSyn_TextChanged"/>
            <TextBox x:Name="tbPopulationS3" Grid.Column="6" Grid.Row="0" TextChanged="tbSyn_TextChanged"/>

            <TextBlock Text="Intervention" Grid.Column="0" Grid.Row="1"/>
            <TextBox x:Name="tbIntervention" Grid.Column="1" Grid.Row="1" TextChanged="tbElement_TextChanged"/>
            <!--<Rectangle x:Name="legendIntervention" Fill="LightBlue" Grid.Column="2" Grid.Row="1"/>-->
            <ComboBox x:Name="cbLegendIntervention" Grid.Column="2" Grid.Row="1" SelectedIndex="1" SelectionChanged="cbLegenda_SelectionChanged">
                <Rectangle Fill="Red" Width="50" Height="30" />
                <Rectangle Fill="Purple" Width="50" Height="30" />
                <Rectangle Fill="Blue" Width="50" Height="30" />
                <Rectangle Fill="Green" Width="50" Height="30" />
                <Rectangle Fill="Pink" Width="50" Height="30" />
            </ComboBox>
            <Border x:Name="warningIntervention" Grid.Column="3" Grid.Row="1" Visibility="Collapsed" Background="Yellow" BorderBrush="Black" BorderThickness="3" CornerRadius="30,30,5,5" ToolTipService.ToolTip="WARNING: It's not in your question.">
                <TextBlock Text="!" HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </Border>
            <TextBox x:Name="tbInterventionS1" Grid.Column="4" Grid.Row="1" TextChanged="tbSyn_TextChanged"/>
            <TextBox x:Name="tbInterventionS2" Grid.Column="5" Grid.Row="1" TextChanged="tbSyn_TextChanged"/>
            <TextBox x:Name="tbInterventionS3" Grid.Column="6" Grid.Row="1" TextChanged="tbSyn_TextChanged"/>

            <TextBlock Text="Comparison" Grid.Column="0" Grid.Row="2"/>
            <TextBox x:Name="tbComparison" Grid.Column="1" Grid.Row="2" TextChanged="tbElement_TextChanged"/>
            <!--<Rectangle x:Name="legendComparison" Fill="Yellow" Grid.Column="2" Grid.Row="2"/>-->
            <ComboBox x:Name="cbLegendComparison" Grid.Column="2" Grid.Row="2" SelectedIndex="2" SelectionChanged="cbLegenda_SelectionChanged">
                <Rectangle Fill="Red" Width="50" Height="30" />
                <Rectangle Fill="Purple" Width="50" Height="30" />
                <Rectangle Fill="Blue" Width="50" Height="30" />
                <Rectangle Fill="Green" Width="50" Height="30" />
                <Rectangle Fill="Pink" Width="50" Height="30" />
            </ComboBox>
            <Border x:Name="warningComparison" Grid.Column="3" Grid.Row="2" Visibility="Collapsed" Background="Yellow" BorderBrush="Black" BorderThickness="3" CornerRadius="30,30,5,5" ToolTipService.ToolTip="WARNING: It's not in your question.">
                <TextBlock Text="!" HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </Border>
            <TextBox x:Name="tbComparisonS1" Grid.Column="4" Grid.Row="2" TextChanged="tbSyn_TextChanged"/>
            <TextBox x:Name="tbComparisonS2" Grid.Column="5" Grid.Row="2" TextChanged="tbSyn_TextChanged"/>
            <TextBox x:Name="tbComparisonS3" Grid.Column="6" Grid.Row="2" TextChanged="tbSyn_TextChanged"/>

            <TextBlock Text="Outcome" Grid.Column="0" Grid.Row="3"/>
            <TextBox x:Name="tbOutcome" Grid.Column="1" Grid.Row="3" TextChanged="tbElement_TextChanged"/>
            <!--<Rectangle x:Name="legendOutcome" Fill="LightGreen" Grid.Column="2" Grid.Row="3"/>-->
            <ComboBox x:Name="cbLegendOutcome" Grid.Column="2" Grid.Row="3" SelectedIndex="3" SelectionChanged="cbLegenda_SelectionChanged">
                <Rectangle Fill="Red" Width="50" Height="30" />
                <Rectangle Fill="Purple" Width="50" Height="30" />
                <Rectangle Fill="Blue" Width="50" Height="30" />
                <Rectangle Fill="Green" Width="50" Height="30" />
                <Rectangle Fill="Pink" Width="50" Height="30" />
            </ComboBox>
            <Border x:Name="warningOutcome" Grid.Column="3" Grid.Row="3" Visibility="Collapsed" Background="Yellow" BorderBrush="Black" BorderThickness="3" CornerRadius="30,30,5,5" ToolTipService.ToolTip="WARNING: It's not in your question.">
                <TextBlock Text="!" HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </Border>
            <TextBox x:Name="tbOutcomeS1" Grid.Column="4" Grid.Row="3" TextChanged="tbSyn_TextChanged"/>
            <TextBox x:Name="tbOutcomeS2" Grid.Column="5" Grid.Row="3" TextChanged="tbSyn_TextChanged"/>
            <TextBox x:Name="tbOutcomeS3" Grid.Column="6" Grid.Row="3" TextChanged="tbSyn_TextChanged"/>

            <TextBlock Text="Context" Grid.Column="0" Grid.Row="4"/>
            <TextBox x:Name="tbContext" Grid.Column="1" Grid.Row="4" TextChanged="tbElement_TextChanged"/>
            <!--<Rectangle x:Name="legendContext" Fill="Pink" Grid.Column="2" Grid.Row="4"/>-->
            <ComboBox x:Name="cbLegendContext" Grid.Column="2" Grid.Row="4" SelectedIndex="4" SelectionChanged="cbLegenda_SelectionChanged">
                <Rectangle Fill="Red" Width="50" Height="30" />
                <Rectangle Fill="Purple" Width="50" Height="30" />
                <Rectangle Fill="Blue" Width="50" Height="30" />
                <Rectangle Fill="Green" Width="50" Height="30" />
                <Rectangle Fill="Pink" Width="50" Height="30" />
            </ComboBox>
            <Border x:Name="warningContext" Grid.Column="3" Grid.Row="4" Visibility="Collapsed" Background="Yellow" BorderBrush="Black" BorderThickness="3" CornerRadius="30,30,5,5" ToolTipService.ToolTip="WARNING: It's not in your question.">
                <TextBlock Text="!" HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </Border>
            <TextBox x:Name="tbContextS1" Grid.Column="4" Grid.Row="4" TextChanged="tbSyn_TextChanged"/>
            <TextBox x:Name="tbContextS2" Grid.Column="5" Grid.Row="4" TextChanged="tbSyn_TextChanged"/>
            <TextBox x:Name="tbContextS3" Grid.Column="6" Grid.Row="4" TextChanged="tbSyn_TextChanged"/>
        </Grid>

        <RichTextBox x:Name="tbQuery" Grid.Row="4" Margin="10,10,10,25" IsReadOnly="True" FontSize="18"/>
        
        <TextBlock Text="Developed by: Jiéverson Maissiat" Grid.Row="4" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="5"/>
        
        <Grid x:Name="popUp" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.RowSpan="5" Visibility="Collapsed">
            <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="DarkCyan"  Opacity="0.8"/>
            <modals:ReportBugModal  x:Name="modalReportBug"/>
        </Grid>
    </Grid>
</UserControl>
